//
//  AGLChannel.m
//  滴滴快拍
//
//  Created by dllo on 16/5/19.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "AGLChannel.h"

@implementation AGLChannel

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    //    if ([key isEqualToString:@"owner"]) {
    //        self.name = [value objectForKey:@"name"];
    //    }
    if ([key isEqualToString:@"channel"]) {
        NSDictionary *dic = value;
        self.ft = dic[@"ext"][@"ft"];
        self.picbase = dic[@"pic"][@"base"];
        self.picm = dic[@"pic"][@"m"];
        self.icon = dic[@"ext"][@"owner"][@"icon"];
        self.nick = dic[@"ext"][@"owner"][@"nick"];
        self.lcnt = dic[@"stat"][@"lcnt"];
        self.ft = dic[@"ext"][@"ft"];
        self.finishTimeNice = dic[@"ext"][@"finishTimeNice"];
        self.t = dic[@"ext"][@"t"];
        self.streambase = dic[@"stream"][@"base"];
        self.scid = dic[@"scid"];
        self.ccnt = dic[@"stat"][@"ccnt"];
        self.streambase = [NSString stringWithFormat:@"%@%@",dic[@"stream"][@"base"],dic[@"stream"][@"ios"]];
        self.previewStr = [NSString stringWithFormat:@"%@%@", self.picbase, self.picm];
        self.w = dic[@"ext"][@"w"];
        self.h = dic[@"ext"][@"h"];
    }
}

@end
